Skip to content

Use the configured model by default - #39

Open
HartBrook wants to merge 1 commit into
mainfrom
feat/default-model-override
Open

HartBrook wants to merge 1 commit into
mainfrom
feat/default-model-override

Conversation

@HartBrook

Copy link
Copy Markdown
Owner

Summary

  • remove the persistent model selector from the real-review top bar
  • use the first configured provider/model automatically and show the effective selection beside Generate
  • add transactional, review-scoped overrides with cancel, reset, and reload persistence
  • keep the model-context privacy preview unchanged
  • update docs and live/end-to-end coverage

Verification

  • npm run typecheck
  • server: 24 files, 155 tests passed
  • web: 10 files, 60 tests passed
  • Playwright: 9 tests passed
  • npm run build

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

⊕ Entity-level changes

README.md

Status Type Name
Δ heading Read-only change acquisition
Δ heading Portable, local-first AI

apps/server/src/app.test.ts

Status Type Name
Δ test_suite generated tour API
+ test exposes the configured default and persists a session model override

apps/server/src/app.ts

Status Type Name
Δ orphan module-level
Δ function createApp

apps/server/src/providers/catalog.test.ts

Status Type Name
Δ orphan module-level
Δ test_suite model catalog
+ test selects the first configured provider as the application default
+ test falls back to Codex setup when no provider is configured

module-level

- import { describe, expect, it } from "vitest";
- import { MODEL_CATALOG, publicProviders, validateSelection } from "./catalog.js";
+ import { describe, expect, it } from "vitest";
+ import { defaultSelection, MODEL_CATALOG, publicProviders, validateSelection } from "./catalog.js";

apps/server/src/providers/catalog.ts

Status Type Name
+ function defaultSelection

apps/server/src/sessions.test.ts

Status Type Name
Δ test_suite local review sessions
Δ test stores one generated tour for the pinned session revision
+ test persists and clears a review-scoped model override

apps/server/src/sessions.ts

Status Type Name
+ method getModelSelectionOverride
+ method saveModelSelectionOverride
Δ function migrate

apps/web/src/App.tsx

Status Type Name
Δ orphan module-level
Δ function AcquiredReviewApp
+ function saveModelSettings
Δ function AcquiredSummary
Δ function ReviewApp
Δ function ModelPicker
Δ function chooseProvider
- function restoreModelSelection
+ function sameModelSelection
+ function modelSelectionLabel
+ function reasoningEffortLabel

apps/web/src/ai.test.ts

Status Type Name
Δ orphan module-level
Δ test_suite AI model selection
- test migrates a saved named Codex selection to the account default
- test migrates a saved named Codex selection even when no provider is configured
- test stays on the current provider when its saved model is no longer offered
- test resets a reasoning effort the saved model does not support
- test keeps a valid selection untouched and replaces an unreadable one
- test moves to a configured provider when the saved one is not set up

module-level

- import { describe, expect, it } from "vitest";
- import { DEFAULT_SELECTION, FALLBACK_PROVIDERS, normalizeSelection, preferredAvailableSelection, selectedModel } from "./ai";
- import type { ModelSelection } from "./types";
+ import { describe, expect, it } from "vitest";
+ import { DEFAULT_SELECTION, FALLBACK_PROVIDERS, selectedModel } from "./ai";

apps/web/src/ai.ts

Status Type Name
+ interface ProviderCatalog
→ property providers
+ property defaultSelection
Δ function fetchProviders
- function normalizeSelection
- function preferredAvailableSelection

moved from fetchProviders

apps/web/src/session.ts

Status Type Name
+ function fetchSessionModelSelectionOverride
+ property error
+ property override
+ function saveSessionModelSelectionOverride
+ property error
+ property override

apps/web/src/styles.css

Status Type Name
Δ chunk lines 321-340
Δ chunk lines 341-360
Δ chunk lines 361-380
Δ chunk lines 381-400
Δ chunk lines 401-420
Δ chunk lines 421-440
Δ chunk lines 441-460
Δ chunk lines 461-480
Δ chunk lines 481-500
Δ chunk lines 501-520
Δ chunk lines 521-540
Δ chunk lines 541-560
Δ chunk lines 561-580
Δ chunk lines 581-600
Δ chunk lines 601-620
Δ chunk lines 621-640
- chunk lines 641-650
+ chunk lines 641-653

e2e-live/reviewer-live.spec.ts

Status Type Name
Δ test @live-acquire acquires and renders the current pull request

e2e/reviewer-flow.spec.ts

Status Type Name
+ test uses the configured default and applies model changes only after confirmation
+ orphan module-level
Δ function mockReviewApi
Δ variable providers
+ variable defaultSelection

Summary: 23 added, 38 modified, 10 deleted, 1 moved across 14 files (1 added orphan, 4 modified orphans)

⊕ entity-level diff by sem · add it to your repo in 2 minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant